<extend name="Public:base" />
<block name="title"><title>后台管理 | 修改文章</title></block>
<meta charset="utf-8" />
<block name="css">
<link rel="stylesheet" type="text/css" href="__CSS__/select2_metro.css" />

<link rel="stylesheet" type="text/css" href="__CSS__/chosen.css" />


</block>
<block name="script">
	<!-- BEGIN PAGE LEVEL PLUGINS -->
	<script type="text/javascript" src="__JS__/jquery.validate.min.js"></script>
	<script type="text/javascript" src="__JS__/additional-methods.min.js"></script>
	<script type="text/javascript" src="__JS__/select2.min.js"></script>
	<script type="text/javascript" src="__JS__/chosen.jquery.min.js"></script>
	<!-- END PAGE LEVEL PLUGINS -->
	<!-- BEGIN PAGE LEVEL STYLES -->
	<script src="__JS__/app.js"></script>
	<script src="__JS__/form-validation.js"></script>
	
	
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/Uedit/ueditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/Uedit/ueditor.all.min.js"> </script>
    
    <script type="text/javascript" charset="utf-8" src="__PUBLIC__/Uedit/lang/zh-cn/zh-cn.js"></script>
    
	<!-- END PAGE LEVEL STYLES -->
	<script>
		jQuery(document).ready(function() {
		   // initiate layout and plugins
		   App.init();
		   FormValidation.init();		   
		});
		var ue = UE.getEditor('editor');
		function getContent() {
	        var arr = [];
	        arr.push(UE.getEditor('editor').getContent());
	        //alert(arr.join("\n"));
	        $("#content").val(arr);
	        //alert($("#content").val());
	    }
	</script>
</block>
<block name="sidebarmenu">
	<li class="start">

		<a href="__APP__">

		<i class="icon-home"></i> 

		<span class="title">管理首页</span>

		</a>

	</li>

	<li class="">

		<a href="javascript:;">

		<i class="icon-cogs"></i> 

		<span class="title">系统设置</span>

		<span class="arrow "></span>

		</a>

		<ul class="sub-menu">

			<li >

				<a href="layout_horizontal_sidebar_menu.html">

				数据库设置</a>

			</li>

		</ul>

	</li>

	<li class="active">

		<a href="javascript:;">

		<i class="icon-bookmark-empty"></i> 

		<span class="title">文章管理</span>

		<span class="arrow "></span>

		</a>

		<ul class="sub-menu">

			<li class="active">

				<a href="{:U('Article/artList')}">

				文章列表</a>

			</li>

			<li >

				<a href="{:U('Article/addArt')}">

				添加文章</a>

			</li>

			<li>

				<a href="{:U('Article/cateList')}">

				分类列表</a>

			</li>

			<li>

				<a href="{:U('Article/addCate')}">

				添加分类</a>

			</li>

		</ul>

	</li>

	<li>

		<a href="javascript:;">

		<i class="icon-user"></i> 

		<span class="title">用户管理</span>

		<span class="arrow "></span>

		</a>

		<ul class="sub-menu">

			<li>

				<a href="{:U('User/userlist')}">

				用户列表</a>

			</li>
			<li class="">

				<a href="{:U('User/addUser')}">

				添加用户</a>

			</li>

			<li >

				<a href="{:U('User/editPass')}">

				修改密码</a>

			</li>

		</ul>

	</li>

	<li class="">

		<a href="javascript:;">

		<i class="icon-th"></i> 

		<span class="title">Data Tables</span>

		<span class="selected"></span>

		<span class="arrow open"></span>

		</a>

		<ul class="sub-menu">

			<li class="">

				<a href="table_basic.html">

				Basic Tables</a>

			</li>

		</ul>

	</li>
</block>

<block name="page-title">				
	<h3 class="page-title">
		文章管理 <small>对文章进行系统管理	</small>
	</h3>
	<ul class="breadcrumb">
		<li>
			<i class="icon-home"></i>
			<a href="__APP__">主页</a> 
			<i class="icon-angle-right"></i>
			<a href="{:U('Article/artList')}">文章管理</a> 
			<i class="icon-angle-right"></i>
			<a href="{:U('Article/addSort')}">修改文章</a> 
		</li>
	</ul>
</block>
						
<block name="page-content">
	<div class="row-fluid">

		<div class="span12">
	
			<!-- BEGIN VALIDATION STATES-->
	
			<div class="portlet box red">
	
				<div class="portlet-title">
	
					<div class="caption"><i class="icon-reorder"></i>修改文章</div>
	
					<div class="tools">
	
						<a href="javascript:;" class="collapse"></a>
	
						<a href="#portlet-config" data-toggle="modal" class="config"></a>
	
						<a href="javascript:;" class="reload"></a>
	
						<a href="javascript:;" class="remove"></a>
	
					</div>
	
				</div>
	
				<div class="portlet-body form">
	
					<!-- BEGIN FORM-->
	
					<form action="{:U('doEditArt')}" method="post" id="form_sample_2" class="form-horizontal">
						<div class="control-group">
	
							<label class="control-label">文章标题</label>
	
							<div class="controls">
								<input type="hidden" name="aid" value="{$art.aid}"/>
	
								<input type="text" name="title" data-required="1" class="span10 m-wrap" value="{$art.title}"/>
	
							</div>
	
						</div>
						<div class="control-group">

							<label class="control-label">分类</label>

							<div class="controls">

								<select class="large m-wrap" name="cate" tabindex="1">
									<foreach name="cate" item="v" key="k">
										<option value="{$v.cid}" {$v['cid']==$art['cid']?selected:""}>{$v.cate_name}</option>
									</foreach>

								</select>

							</div>

						</div>
						<div class="control-group">
	
							<label class="control-label">文章描述</label>
	
							<div class="controls">
	
								<textarea name="description" class="span10 m-wrap">{$art.description}</textarea>
	
							</div>
	
						</div>
						<div class="control-group">
	
							<label class="control-label">排序</label>
	
							<div class="controls">
	
								<input type="text" name="sort" data-required="1" class="span10 m-wrap" value="{$art.sort}"/>
	
							</div>
	
						</div>
						<div class="control-group">
	
							<label class="control-label">关键字</label>
	
							<div class="controls">
	
								<input type="text" name="keywords" data-required="1" class="span10 m-wrap" value="{$art.keywords}"/>
	
							</div>
	
						</div>
	
						<div class="control-group">
							<input type="hidden" id="content" name="content" value=""/>
    						<script id="editor" type="text/plain" style="width:100%;height:100%;min-height:300px;">{$art.content}</script>
						</div>
						<div class="form-actions">
	
							<button type="submit" onclick="getContent();" class="btn red">保存</button>
	
							<button type="button" class="btn" onclick="window.history.back(-1);">返回</button>
	
						</div>
	
					</form>
	
					<!-- END FORM-->
	
				</div>
	
			</div>
	
			<!-- END VALIDATION STATES-->
	
		</div>
	
	</div>

</block> 

